package cn.msi.question.action;

import cn.common.action.GeneralAction;
import cn.msi.question.domain.Sort;
import cn.msi.question.service.SortService;

public class SortAction extends GeneralAction {

	private static final long serialVersionUID = 3060876792326618513L;

	private SortService sortService;

	private Sort sort = new Sort();

	/**
	 * 搜索样题分类
	 * 
	 * @throws Exception
	 */
	public void searchSort() throws Exception {
		String json = sortService.searchSort(sort);
		out(json);
	}

	/**
	 * 添加样题分类信息
	 * 
	 * @throws Exception
	 */
	public void appendSort() throws Exception {
		sortService.addSort(sort);
	}
	
	/**
	 * 删除分类
	 * @throws Exception
	 */
	public void delSort() throws Exception {
		sortService.delSort(sort);
	}

	/**
	 * 分类页面
	 * 
	 * @return
	 * @throws Exception
	 */
	public String appendSortPage() throws Exception {
		return SUCCESS;
	}

	public Sort getSort() {
		return sort;
	}

	public void setSort(Sort sort) {
		this.sort = sort;
	}

	public void setSortService(SortService sortService) {
		this.sortService = sortService;
	}
}
